package com.mini.cn.goods.servlet.ws.serializer;

/**
 * Created with IntelliJ IDEA.

 * User: fly
 * Date: 2020-05-15
 * Time: 2:32 下午
 */
public enum SerializerFactory {

    INTANCE;

    private final ISerializer jsonSerializer;

    SerializerFactory() {
        jsonSerializer = new JsonSerializer();
    }

    public ISerializer getIntanceSerializer(byte type) {
        switch (type) {
            case ISerializer.JSON:
                return jsonSerializer;
            default:
                return null;
        }
    }

    public ISerializer getDEFAULTSerializer() {
        return jsonSerializer;
    }
}
